package com.ruoyi.web.controller.run;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import java.io.File;


/**
 * @类名: FilePathRunner
 * @功能描述 应用程序启动时创建apk更新包目录
 * @作者信息 Wang_xiaodong
 * @创建时间 2020-12-29 8:48
 */
@Component
public class FilePathRunner implements CommandLineRunner {

    @Override
    public void run(String... args) throws Exception {

        String path = "apkDownload" + File.separator;
        File f = new File(path);
        if (!f.exists()) {
            f.mkdirs();
            System.out.println(f + "目录已创建");
        } else {
            System.out.println(f + "目录已存在");
        }
    }
}
